package com.queue.rabbitmq.controller;

import com.queue.rabbitmq.mapper.RabbitmqMapper;
import com.queue.rabbitmq.service.RabbitmqService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class RabbitmqController {

    @Autowired
    private RabbitmqService rabbitmqService;

    @RequestMapping("/sendWork")
    @ResponseBody
    public Object sendWork(){
        rabbitmqService.sendWork();
        return "发送成功。。。。";
    }

    @RequestMapping("/sendPublish")
    @ResponseBody
    public Object sendPublish(){
        rabbitmqService.sendPublish();
        return "发送成功。。。。";
    }

    @RequestMapping("/sendTopic")
    @ResponseBody
    public Object sendTopic(){
        rabbitmqService.sendTopic();
        return "发送成功。。。。";
    }

    @RequestMapping("/sendConfirm")
    @ResponseBody
    public Object sendConfirm(){
        rabbitmqService.sendConfirm();
        return "发送成功。。。。";
    }

    @RequestMapping("/sendReturn")
    @ResponseBody
    public Object sendReturn(){
        rabbitmqService.sendReturn();
        return "发送成功。。。。";
    }
}
